package com.tacuati.ui;

import javax.swing.DropMode;
import javax.swing.JTree;

import com.tacuati.content.Content;

public class ContentTree extends JTree {

	private static final long serialVersionUID = 1L;

	public ContentTree(Content kindleContent) {
		super(new ContentTreeModel(kindleContent));
		setTransferHandler(new ContentTreeTransferHandler());
		setCellRenderer(new ContentTreeIconRenderer());
		setCellEditor(new ContentTreeCellEditor());
		setDragEnabled(true);
		setDropMode(DropMode.ON_OR_INSERT);
		setRootVisible(false);
		setEditable(true);
	}
}
